package com.beaven.imserver.net;

import com.beaven.imserver.net.providers.AuthRequestFilter;
import com.beaven.imserver.net.providers.GsonProvider;
import com.beaven.imserver.net.service.AccountService;
import java.util.logging.Logger;
import org.glassfish.jersey.server.ResourceConfig;

/**
 * author: Beaven
 * time: 2017/5/17 9:13
 */
public class Application extends ResourceConfig {

  public Application() {

    //注册逻辑处理的包名
    packages(AccountService.class.getPackage().getName());

    // 注册全局请求拦截器
    register(AuthRequestFilter.class);

    // 注册Json解析器
    register(GsonProvider.class);

    // 注册日志打印输出
    register(Logger.class);
  }
}
